from django import forms


class PubBlogForm(forms.Form):
    title = forms.CharField(
        max_length=50,
        min_length=1,
        error_messages={
            "required": "请输入标题",
            "max_length": "标题长度50位",
            "min_length": "标题长度1位",
        },
    )
    content = forms.CharField(
        max_length=5000,
        error_messages={"max_length": "内容长度5000位"},
    )
    category = forms.IntegerField()
